package org.jeecg.modules.order.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.order.entity.BusOrder;
import org.jeecg.modules.order.entity.BusOrderItem;
import org.jeecg.modules.order.entity.BusOrderPics;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @Description: 订单表
 * @Author: jeecg-boot
 * @Date: 2021-07-13
 * @Version: V1.0
 */
public interface IBusOrderService extends IService<BusOrder> {

    /**
     * 添加一对多
     */
    public void saveMain(BusOrder busOrder, List<BusOrderItem> busOrderItemList, List<BusOrderPics> busOrderPicsList);

    /**
     * 修改一对多
     */
    public void updateMain(BusOrder busOrder, List<BusOrderItem> busOrderItemList, List<BusOrderPics> busOrderPicsList);

    /**
     * 删除一对多
     */
    public void delMain(String id);

    /**
     * 批量删除一对多
     */
    public void delBatchMain(Collection<? extends Serializable> idList);


    Map<Integer, Integer> countStatus(Map<String, Object> params);


    /**
     * 添加订单价格
     *
     * @param price
     * @param busOrderId
     */
    public void modifyPrice(BigDecimal price, String busOrderId);
}
